package com.wp.design.observer;

import java.util.Observable;

public class Course extends Observable{
	private String courseName;

	public Course(String courseName) {
		this.courseName = courseName;
	}

	public String getCourseName() {
		return courseName;
	}

	public void produceQuestion(Course course,Question question){
		System.out.println(question.getUserName()+"在"+course.courseName+"上提交了一个问题");
		setChanged();
		notifyObservers(question);
	}
}
